package cn.panda.edu.dao;

import cn.panda.edu.model.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * 类描述：  Dao层Student接口类  
 */
public interface StudentMapper {
	
	/**
	 * 
	* @Title: deleteByPrimaryKey 
	* @Description: 根据主键删除
	* @param studentId
	* @return  
	* int
	 */
    int deleteByPrimaryKey(Integer studentId);

    /**
     * 
    * @Title: insert 
    * @Description: 添加学生信息
    * @param record
    * @return  
    * int
     */
    int insert(Student record);
    
    /**
     * 
    * @Title: insertSelective 
    * @Description: 有选择的添加学生信息
    * @param record
    * @return  
    * int
     */
    int insertSelective(Student record);

    /**
     * 
    * @Title: selectByPrimaryKey 
    * @Description: 根据主键查询
    * @param studentId
    * @return  
    * Student
     */
    Student selectByPrimaryKey(Integer studentId);
    
    /**
     * 
    * @Title: updateByPrimaryKeySelective 
    * @Description: 根据主键有选择的更新
    * @param record
    * @return  
    * int
     */
    int updateByPrimaryKeySelective(Student record);
    
    /**
     * 
    * @Title: updateByPrimaryKey 
    * @Description: 根据主键更新全部信息
    * @param record
    * @return  
    * int
     */
    int updateByPrimaryKey(Student record);
    
    /**
     * 
    * @Title: selectByName 
    * @Description: TODO(根据姓名或学生编号模糊查询学生 排序) 
    * @param record
    * @return  
    * List<Student>
     */
    List<Student> selectByNameAndId(Student record);
    
//    /**
//     *
//    * @Title: selectWithScoreByPrimaryKey
//    * @Description: 根据主键查询学生信息及其成绩
//    * @param studentId
//    * @return
//    * Student
//     */
//    Student selectWithScoreByPrimaryKey(Integer studentId);
    
    /**
     * 
    * @Title: selectWithExamByPrimaryKey
    * @Description: 根据主键查询学生信息及其考试信息
    * @param studentId
    * @return  
    * Student
     */
    Student selectWithExamByPrimaryKey(Integer studentId, Integer state);
    
    Student selectByNameAndPwd(@Param("studentName") String nameString, @Param("password") String pwd) ;
    
}